#ifndef __NONAME_EVENT_H__
#define __NONAME_EVENT_H__

#define NONAME_LIB_USE
#include <ntifs.h>

class kevent {

public:
	kevent() : m_Event(0) {}
	NTSTATUS Create(EVENT_TYPE Type = NotificationEvent, BOOLEAN InitialState = FALSE);
	NTSTATUS Create(PWCHAR Name, EVENT_TYPE Type = NotificationEvent, BOOLEAN InitialState = FALSE);
	NTSTATUS Wait(PLARGE_INTEGER Timeout = NULL, BOOLEAN Alertable = FALSE);
	NTSTATUS Set(PLONG PreviousState);

private:
	HANDLE m_Event;
};

#endif